<template>
	<van-row class="pageTop"  type="flex" align="center" justify="center">
		<van-col span="3" offset="1" size='1rem' v-if='isHeader'>
			栎车网
		</van-col>
		<van-col span="3" v-else  @click='$router.go(-1)' size='1rem'>
			<van-icon name="arrow-left"/>返回
		</van-col>
		<van-col span="3" size='1rem' offset="1" >
			{{getLocation}}
		</van-col>
		<van-col span="1" offset="0" >
			<van-icon name="arrow-down" />
		</van-col>
		<van-col span="16">
			<van-search @search='toSearch' v-model="searchValue" shape="round" background="#39bc30" placeholder="宝马730Li" />
		</van-col>
		
		<van-col span="2">
			<van-icon size="24px" color="white" dot name="chat-o"></van-icon>
		</van-col>
	</van-row>
</template>

<script>
		import {mapGetters} from "vuex"
	export default {
	data(){
		return{
			searchValue:'',
			
		}
	},
	computed:{
		...mapGetters(['getLocation','isHeader']),
	},
	methods:{
		toSearch(){
			this.$router.push({path:'/search',query:{key:this.searchValue}})
		}
	},
	
		
	}
</script>

<style scoped="">
	.pageTop {
		font-size:.7rem;
		background: #39bc30;
		color:white;
	}
</style>
